﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Windows.Forms;

namespace GUI
{
    public partial class Form1 : Form
    {
        public static string traderID;

        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }

        private void textBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            traderID = TraderID.Text;
            if (traderID.Length == 5 && Regex.IsMatch(traderID, @"^[a-zA-Z]{5}$"))
            {
                Form2 frontEnd = new Form2();
                //this.Visible = false;
                //this.Hide();
                //frontEnd.ShowDialog();
                this.Hide();
                frontEnd.Show();      
            }
            else
            {
                MessageBox.Show("Please enter your FIVE LETTER acronym");
            }
        }

        private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void label1_Click(object sender, EventArgs e)
        {

        }
    }
}
